import request from "@/utils/request";
//查询菜单列表
export const getMenuList = () => {
    return request({
        url: '/system/menu/tree',
        method: 'get',
    })
}
//查询菜单详细
export const getMenu = (id: number) => {
    return request({
        url: `/system/menu/list/${id}`,
        method: 'get',
    })
}
//添加菜单
export const addMenu = (data: object) => {
    return request({
        url: '/system/menu/add',
        method: 'post',
        data: data
    })
}
//修改菜单
export const upMenu = (data: object) => {
    return request({
        url: '/system/menu/up',
        method: 'put',
        data: data
    })
}
//删除菜单
export const deleteMenu = (id: number) => {
    return request({
        url: `/system/menu/delete/${id}`,
        method: 'delete',
    })
}